import Home from '../Views/Home'
import Category from '../Views/Category'
import Login from '../Views/Login'
import {Navigate} from 'react-router-dom'
// import SearchPage from '../Views/Home/components/SearchPage'
import AddUser from '../Views/Login/AddUser'
import LoginPage from '../Views/Login/LoginPage'
import DetailPage from '../Views/DetailPage'
import ProductDetail from '../Views/DetailPage/ProductDetail'
import EvaluatePage from '../Views/DetailPage/EvaluatePage'
import QuestionPage from '../Views/DetailPage/QuestionPage'
import SearchPage from '../Views/Home/components/SearchPage'
// eslint-disable-next-line import/no-anonymous-default-export
export default [

	  {
		path: '',
		element: <Navigate to="/login" />
	  },

	{
		// path:'/home/:username',
		path:'/home',
		element:<Home/>,
		children:[
			{
				path:'category',
				element:<Category></Category>
			},
			{

			},

		]
	},
	{
	 path: '/searchpage',
	 element:<SearchPage></SearchPage>
	},
	{
		path:'/category',
		element:<Category/>
	},
	{
		path:'/login',
		element:<Login/>,
		children:[
			{
				path:'',
				element:<LoginPage/>
			},
			{
				path:'adduser',
				element:<AddUser/>
			}
		]
	},
	{
		path:'/detail',
		element:<DetailPage/>,
		children:[
			// {
			// 	path: '',
			// 	element: <Navigate to="productdetail" replace={true} />
			//   },
			{
				path:'',
				element:<ProductDetail/>
			},
			{
				path:'evaluate',
				element:<EvaluatePage/>
			},
			{
				path:'question',
				element:<QuestionPage></QuestionPage>
			}
		]

	}
	
	// {
	// 	path:'searchpage',
	// 	element:<SearchPage/>
	// }
	
]